import { http } from "@/utils/http";

/** 获取所有人的帖子 */
export const getAllArticle = (params?: object) => {
  return http.request<any>("get", "/article/getAllArticle", { params });
};
/** 获取所有人的帖子评论 */
export const getAllcommentList = (params?: object) => {
  return http.request<any>("get", "/article/getArticleCommentList", { params });
};
/** 修改帖子信息 */
export const updateArticle = (data?: object) => {
  return http.request<any>("put", "/article/updateArticle", { data });
};
/** 删除所有人的帖子 */
export const deleteArticle = (data?: object) => {
  return http.request<any>("delete", "/article/deleteArticle", { data });
};
/** 删除所有人的帖子评论 */
export const deletecomment = (data?: object) => {
  return http.request<any>("delete", "/article/deletecomment", { data });
};

/** 添加所有人的帖子评论 */
export const articleComment = (data?: object) => {
  return http.request<any>("post", "/article/articleComment", { data });
};

/** 添加所有人的帖子评论 */
export const addArticle = (data?: object) => {
  return http.request<any>("post", "/article/addArticle", { data });
};

/** 添加所有人的帖子评论 */
export const getArticleDetail = (params?: object) => {
  return http.request<any>("get", "/article/getArticleDetail", { params });
};

/** 添加所有人的帖子评论 */
export const getUserArticle = (params?: object) => {
  return http.request<any>("get", "/article/getUserArticle", { params });
};
